import React from "react";
import { initialize, mswDecorator } from "msw-storybook-addon";
import { Provider as ThemeProvider } from "../src/theme";
import "./style.css";

export const parameters = {
  actions: { argTypesRegex: "^on[A-Z].*" },
  controls: {
    matchers: {
      color: /(background|color)$/i,
      date: /Date$/,
    },
  },
};

const withConfigPrivider = (Story, context) => {
  return (
    <ThemeProvider>
      <Story />
    </ThemeProvider>
  );
};

// More: https://storybook.js.org/addons/msw-storybook-addon
initialize();

export const decorators = [withConfigPrivider, mswDecorator];
